Discuss the different variable, data type use in C language ( BCA-1st semester)


Variable definition


It hold a value that can be modified by the program.The value of variable can be changed during execution.


Variable for example

   < data type> < variable- name>;


Type of variable



1-Local variable:- these variable are declare inside a function with proper data type.


2-Global variable:- Global variable are created by declaring them outside of any                                             function. It is  helpful when many function in the program use the same data


3-Constant variable:- It is a value can be stored in the memory cannot change during                                         execution  of the program. There are two types of constant variable. 

            
              a) Numeric constant
              b) character constant

      

4. Data type:- Data type is define as a finite set of value along with well defined set off rules for operation that can be performed.

C support  different type of data.


https://www.blogger.com/blog/post/edit/5964857011642541800/5979158588229685957

  1. Primary (In- buil):- Char, int, float, double, void

      .2-User define:-Array, pointer, structure, union.         


No comments:

Post a Comment

If you have any doubts, Please lets me know and Please Follow our Website